<template>
  <div class="user-ranking">
    <div class="top-three">

    </div>
    <div class="lists-body">
      <div class="list">
        <table>
          <thead class="thead">
            <tr>
              <th>排名</th>
              <th>会员姓名</th>
              <th>总赞赏人气</th>
            </tr>
          </thead>
          <tbody>
            <tr v-for="(user, index) in 10" :key="user.id">
              <td>{{ index + 1 }}</td>
              <td>姓名</td>
              <td>4545</td>
            </tr>
            <tr>
              <td>100</td>
              <td>我</td>
              <td>4545</td>
            </tr>
          </tbody>
        </table>
      </div>
    </div>
  </div>
</template>
<script>
export default {
  name: "userRanking",
  data() {
    return {}
  },
  computed: {},
  methods: {},
  created() {
  },
  watch: {}
}
</script>

<style scoped lang="scss">
.user-ranking {
  .list {
    background: #fff;
    border-radius: 8px;
    height: 200px;
    overflow: auto;
    margin-top: 100px;
    &::-webkit-scrollbar {
      width: 0;
    }
  }
  table {
    width: 100%;
    border-spacing: 0;
    tr {
      &:first-child {
        margin-top: 46px;
      }
      th, td {
        text-align: center;
        width: calc(100% * .3);
        height: 45px;
        line-height: 45px;
        position: relative;
        &:after {
          content: "";
          position: absolute;
          left: 0;
          right: 0;
          bottom: 0;
          height: 1px;
          background: $-border-color;
        }
        &:first-child {
          text-align: left;
          padding-left: 16px;
          &:after {
            left: 16px;
          }
        }
        &:last-child {
          text-align: right;
          padding-right: 16px;
          &:after {
            right: 16px;
          }
        }
      }
      th {
        color: $-color-gray;
        font-size: 12px;
        font-weight: 500;
        position: sticky;
        top: 0;
        z-index: 1;
        background: #fff;
      }
    }
    tbody {
      tr {
        td {
          font-weight: bold;
          position: relative;
        }
        td:first-child {
          font-size: 18px;
          font-weight: bold;
        }
        td:last-child {
          font-weight: 500;
          font-family: changchun1hao;
          font-size: 16px;
        }
        &:last-child td {
          position: sticky;
          bottom: 0;
          background: #FFFAE2;
          height: 47px;
          line-height: 47px;
          &:after {
            background: transparent;
          }
        }
      }

    }
  }
}
</style>
